class CreateUsers < ActiveRecord::Migration
  def self.up
    create_table "users", :force => true do |t|
      t.string   :login,                     :limit => 40
      t.string   :name,                      :limit => 100, :null => false
	  t.string   :name2,                     :limit => 100, :null => true
	  t.string   :lastname,                  :limit => 100, :null => false
	  t.string   :lastname2,                 :limit => 100, :null => false
	  t.string   :picture,					 :limit => 100, :default => "/images/avatar.jpg"	
      t.string   :email,                     :limit => 100
      t.string   :crypted_password,          :limit => 40
      t.string   :salt,                      :limit => 40
	  t.string	 :reset_code,                :limit => 500
      t.datetime :created_at
      t.datetime :updated_at
      t.string   :remember_token,            :limit => 40
      t.datetime :remember_token_expires_at
	  t.integer  :status,					 :default => 1

    end
    add_index :users, :login, :unique => true
	add_index :users, :email, :unique => true
  end

  def self.down
    drop_table "users"
  end
end
